#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
	char a[1000] = { 0 };
	char b[1000] = { 0 };
	scanf("%s%s", a,b);
	for (int i = 0; i < strlen(a); i++) {
		char mid = a[i];
		a[i] = b[i];
		b[i] = mid;
	}
	printf("%s\n", a);
	printf("%s\n", b);
	return 0;
}